﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using vnMcdonald.Models;

namespace vnMcdonald.Controllers
{
    public class HomeController : Controller
    {
        vnMcdonaldContext db = new vnMcdonaldContext();
        public ActionResult Index()
        {         
            return View();
        }

        public PartialViewResult NewProduct()
        {
            var product = db.Products.Take(5).OrderByDescending(p => p.CreateDate).ToList();
            return PartialView(product);
        }
        public PartialViewResult About()
        {
            return PartialView();
        }

        public ActionResult Contact()
        {
            return View();
        }
    }
}
